<?php
include "../inc/db.inc.php"; 
  if ($_GET["selBox"] == 1) {
      $queryDb = "rspGroupFromDataSourceId " . $_GET["value"];
      $result = mssqlexecute_query($queryDb);
      $optionBox = '<select name="groupId" id="groupId" style="width:110px" onClick="loadSourceDest()"><option value=-1 > All Groups </option>';
	foreach($result as $row){
          $optionBox = $optionBox . '<option value=' . $row['Id'] . '>' . $row['Name'] . "</option>";
      }
      echo $optionBox . '</select>';
  } 
?>